public class Test {

    public static void main(String[] args) {
        int a=1;
        String name=new String("hello");

        int[] arr1=new int[]{1,2,3,4,5};
        System.out.println(arr1);//打印出的是引用arr1的地址

        int[] arr2=new int[]{10,20,30};
        arr1=arr2;

        for( int num:arr1) {
            System.out.println(num);
        }
    }



    public static void main1(String[] args) {
        int[] arr1=new int[]{1,2,3,4};

        int[] arr2;
//        arr2={1,2,3};//编译失败

        int length = arr1.length; // 获取数组长度
    }
}
